1. Field of the Invention
The present invention is related to improved device blocking and suspension.
2. Description of the Related Art
Disaster recovery systems typically address two types of failures, a sudden catastrophic failure at a single point in time or data loss over a period of time. In the second type of gradual disaster, updates to volumes may be lost. A volume is any logical or physical element of storage. To assist in recovery of data updates, a copy of data may be provided at a remote location. Such dual or shadow copies are typically made as the application system is writing new data to a primary storage device. A storage device is a physical unit that provides a mechanism to store data on a given medium, such that the data can be subsequently retrieved. International Business Machines Corporation (IBM), the assignee of the subject patent application, provides a system for maintaining remote copies of data at a secondary storage device, which is referred to as an extended remote copy (XRC) system.
An IBM XRC system provides a technique for recovering data updates between a last, safe backup and a system failure. Such data shadowing systems can also provide an additional remote copy for non-recovery purposes, such as local access at a remote site. The IBM XRC system is described further in z/OS V1R1.0 DFSMS Advanced Copy Services (IBM Document Number SC35-0428-00), April 2001, which is available from International Business Machines Corporation.
In such backup systems, data is maintained in volume pairs. A volume pair is comprised of a volume in a primary storage device and a corresponding volume in a secondary storage device that includes a consistent copy of the data maintained in the primary volume. Typically, the primary volume of the pair will be maintained in a primary storage control, and the secondary volume of the pair is maintained in a secondary storage control at a different physical location than the primary storage control. A storage control is a physical hardware unit that consists of a storage server integrated with one or more storage devices to provide storage capability to a host computer. A storage server is a physical unit that provides an interface between one or more storage devices and a host computer by providing the function of one or more logical subsystems. The storage server may provide functions that are not provided by the storage device. The storage server is composed of one or more clusters of storage devices. A primary storage control may be provided to control access to the primary DASD and a secondary storage control may be provided to control access to the secondary DASD.
In the IBM XRC environment, the application system writing data to the primary volumes includes a sysplex timer which provides a time-of-day (TOD) value as a time stamp to data writes. The application system time stamps data when writing such data to volumes in the primary DASD. The integrity of data updates is related to insuring that updates are done at the secondary volumes in the volume pair in the same order as they were done on the primary volume. In the XRC and other prior art systems, the time stamp provided by the application program determines the logical sequence of data updates. In many application programs, such as database systems, certain writes cannot occur unless a previous write occurred; otherwise the data integrity would be jeopardized. Such a data write whose integrity is dependent on the occurrence of previous data writes is known as a dependent write. For instance, if a customer opens an account, deposits $400, and then withdraws $300, the withdrawal update to the system is dependent on the occurrence of the other writes, the opening of the account and the deposit. When such dependent transactions are copied from the primary volumes to secondary volumes, the transaction order must be maintained to maintain the integrity of the dependent write operation.
Volumes in the primary and secondary DASDs are consistent when all writes have been transferred in their logical order, i.e., all dependent writes transferred first before the writes dependent thereon. In the banking example, this means that the deposit is written to the secondary volume before the withdrawal. A consistency group is a collection of related data that need to be kept in a consistent state. A consistency transaction set is a collection of updates to the primary volumes such that dependent writes are secured in a consistent manner. For instance, in the banking example, in order to maintain consistency, the withdrawal transaction needs to be in the same consistent transactions set as the deposit or in a later consistent transactions set; the withdrawal cannot be in an earlier consistent transactions set. Consistency groups maintain data consistency across all volumes managed by the IBM XRC system. That is, data consistency is maintained across all volumes. Also, the deposit information may be on one volume, and the withdrawal information may be on another volume. For instance, if a failure occurs, the deposit will be written to the secondary volume before the withdrawal. Thus, when data is recovered from the secondary volumes, the recovered data will be consistent.
A consistency time is a time the system derives from the application system's time stamp to the data. A consistency group has a consistency time for all data writes in a consistency group having a time stamp equal or earlier than the consistency time stamp. In the IBM XRC environment, the consistency time is the latest time to which the system guarantees that updates to the secondary volumes are consistent. If all the records in the consistency group are written to secondary volumes, then the reported consistency time reflects the latest time stamp of all records in the consistency group. Methods for maintaining the sequential consistency of data writes and forming consistency groups to maintain sequential consistency in the transfer of data between a primary DASD and secondary DASD are described in U.S. Pat. Nos. 5,615,329 and 5,504,861, which are assigned to IBM, the assignee of the subject patent application, and which are incorporated herein by reference in their entirety.
Consistency groups are formed within a “session.” A session (comprises all the activities which take place during the establishment, maintenance, and release of a connection for a function, such as copying data from a primary storage device to a secondary storage device. All volume pairs assigned to a session will have their updates maintained in the same consistency group. Thus, the sessions determine the volumes whose updates will form a consistency group.
Consistency groups are copied to journal data sets to ensure that updates are not lost before they can be applied to secondary storage devices. From the journal data sets, updates from a consistency group are applied to the secondary volume. If the system fails while updates from the journal are being applied to a secondary volume, during recovery operations, the updates that did not complete writing to the secondary volume can be recovered from the journal and applied to the secondary volume.
Customers who make backup copies of their production data (also referred to as “shadow data”) using an IBM XRC system may experience premature or unneeded blocking of data writes to storage devices (e.g., primary DASD) storing production data. Blocking of data writes is also referred to as “device blocking” because writes to a storage device (e.g., a volume) are blocked.
An example of a storage control is IBM TotalStorage Enterprise Storage Server (ESS), which is available from International Business Machines Corporation. One storage control may be considered to be the primary control unit, while another storage control may be considered to be the secondary control unit. Each control unit includes cache. When an application updates data on a primary volume managed by the IBM XRC system, the primary control unit copies the updates to a record set in cache. The number of updates in a record set are referred to as “residual records” or “residuals”. The IBM XRC system then reads these record sets from the control unit cache into the IBM XRC system data buffers, and creates consistency groups (as described earlier). The residuals remain in the cache of the primary control unit until the consistency group formed by the residuals is copied to a journal data set.
Storage controls, such as the ESS, which support device blocking, provide the function of temporarily blocking write Input/Output (I/O) requests for production data. In addition, these storage controls may also provide the ability to enable a “long busy” situation on the storage control. A “long busy” situation is one in which the primary control unit notifies a host that it will not accept any more write I/O requests from the host. Where device blocking temporarily blocks write I/O for a storage device (i.e., temporarily blocks every other write I/O request for the storage device), the long busy situation stops all write I/O for all devices that are associated with the storage control whose cache usage has exceeded a certain percentage. The stoppage continues until cache usage is reduced to below the exceeded percentage. A copy services session (e.g., an IBM XRC session) comprises all the activities which take place during the establishment, maintenance, and release of a connection for copying data from a primary control unit to a secondary control unit.
When a production device (e.g., a primary storage device and a primary volume) is added to an IBM XRC session, the IBM XRC session sends an indicator to the storage control indicating that write I/O for the storage device should be blocked after a specified number of write records (also referred to as a residual count) for the storage device have been placed in the primary control unit cache. In particular, a residual count is maintained for each storage device and indicates a number of update records in cache for that storage device. The primary control unit places the write I/O records in cache to allow the IBM XRC session the ability to read them in order that they may be copied to another location (e.g., the secondary control unit, which is also referred to as a shadowed device).
The default value (i.e., blocking threshold) at which device blocking is started for an IBM XRC session is 1280 (500 hex). That is, if over 1280 write records (residual count) are accumulated in cache for a given primary storage device before the IBM XRC session is able to read the write records for this primary storage device, the primary control unit will block every other write I/O request for this primary storage device until the IBM XRC session is able to get the residual count for this primary storage device below this number (i.e., 1280) by reading the write updates from the cache.
The IBM XRC session performs storage device blocking based on the residual count of the storage device regardless of the size of cache available in the primary control unit associated with the storage device. New models of primary control units allow for large cache sizes such as 3 gigabits (3 GB). If an application writes 1280 records with the maximum record length of 56,664 for a given primary storage device, the amount of cache that could be consumed is approximately 72 megabits (72 MB), which is a very small portion of cache (i.e., approximately 0.2 percent of a 3 GB cache). If no other write I/Os were taking place to this primary control unit, this particular primary storage device would be device blocked unnecessarily because cache would still remain available for additional residuals. In addition, periodically (e.g., every 10 seconds), the IBM XRC session determines whether the residual count for the primary storage device that is being device blocked has been reduced below the current blocking threshold, and if not, the IBM XRC reduces the blocking threshold by half.
The purpose of device blocking is to ensure that the primary control unit cache is not over-run with data that needs to be read by copy services functions (e.g., those of the IBM XRC session). Device blocking, however, does not take into account the amount of total cache at the primary control unit used by copy services. Thus, there is a need in the art for improved use of cache.